from django.contrib import admin
from tr.hba.ppba.models import Packager, Archive, Package, Source

class PackagerAdmin(admin.ModelAdmin):
    list_display = ('name', 'email')
    
class ArchiveAdmin(admin.ModelAdmin):
    list_display = ('type', 'sha1sum')
    
class PackageAdmin(admin.ModelAdmin):
    list_display = ('name', 'icon', 'part_of', 'get_dependencies')
    search_fields = ['name']
    
class SourceAdmin(admin.ModelAdmin):
    list_display = ('name', 'home_page', 'icon', 'part_of', 'archive', 'uri', 'get_dependencies')
    
admin.site.register(Packager, PackagerAdmin)
admin.site.register(Archive, ArchiveAdmin)
admin.site.register(Package, PackageAdmin)
admin.site.register(Source, SourceAdmin)